Set Choice `RequestChoice "EP help message!" "EPStart is a script that makes it easier to start EP.*NU SHOULD use it instead of starting EP directly :)*NThe arguments u can pass to it r:*NHELP - Show this requester...*NPREFSWIN - Open the prefs window.*NMUI - Use mui for the prefs window." "Start me up!" "Quit"`
IF VAL $Choice EQ 0
Skip OUCH
ENDIF
ENDIF
;Fix the assign if it doesn't exist...
C:Assign >NIL: EP: EXISTS
IF WARN
IF EXISTS "EP" ;Started from upep dir?
C:Assign >NIL: EP: "" ;Yepps
ELSE
Set Choice `RequestChoice "EP error message!" "EP: hasn't been assigned and couldn't be assigned*Nbecause u didn't start this script from the dir u've*Ngot the EP exe in...what to do now...?" "Assign req" "Quit"`
IF VAL $Choice EQ 0 ;Quit?
Skip OUCH
ELSE ;Assign requester
UnSet UPEPDir
Set UPEPDir `RequestFile TITLE "Select path for EP:" DRAWERSONLY`
IF "$UPEPDir" EQ "*$UPEPDir"
Skip OUCH ;Cancel
ELSE
IF "$UPEPDir" EQ ""
C:Assign >NIL: EP: "" ;OK was just pressed
ELSE
C:Assign >NIL: EP: "$UPEPDir" ;A dir was selected
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
;Run the exe...
Set OldDir `C:Cd` ;Save current dir
C:Cd >NIL: "EP:"
Set UPEPCom "EP" ;Exename
IF "<PREFSWIN>" EQ "PREFSWIN" ;PREFSWIN arg
Set UPEPCom "$UPEPCom PREFSWIN"
ENDIF
IF "<MUI>" EQ "MUI" ;MUI arg
stack 10000 ;U never know with mui proggies...
Set UPEPCom "$UPEPCom MUI"
ENDIF
$UPEPCom ;Run
C:Cd >NIL: "$OldDir" ;Restore dir
Quit ;Exit
Lab OUCH
C:RequestChoice >NIL: "EP sad message :(" "OUCH! That hurts...." "I'll try again later :)"